package com.sxpi.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sxpi.common.result.Result;
import com.sxpi.model.entity.Coupons;
import com.sxpi.model.page.PageResult;
import com.sxpi.model.vo.CouponsVo;

import java.util.List;

/**
 * @author happy
 * @create 2024-10-29-{TIME}
 */
public interface CouponsService extends IService<Coupons> {

    Result<List<Coupons>> getValidCoupons();

    Result<PageResult<Coupons>> getAllCoupons(Integer pageNo, Integer pageSize, Long id);

    /**
     * 获取所有有效的优惠券
     * @return 有效优惠券列表
     */
    Result<Boolean> addCoupons(Coupons coupons, Integer count);



    Result<List<CouponsVo>> getAllCouponsByUser(Long userID, Integer pageNo, Integer pageSize, Integer status);

    Result<Boolean> exchangeCoupons(String data, Long userId);
}